import java.sql.Array;

public class Array_07 {

    public static void main(String[] args) {
            int[] arr={23,56,56564,21321,23123,7878};
            reserve(arr);
    }

    //需求 数组反转


    public static void reserve(int []arr){
        int temp;
        for (int i=0,j=arr.length-1;i<=j;i++,j--)
        {
            temp=arr[i];
            arr[i]=arr[j];
            arr[j]=temp;
        }

       //打印数组
        System.out.print("[");
        for (int i=0;i<arr.length;i++){
            if (i==arr.length-1){
                System.out.print(arr[i]);
            }
            else
            {
                System.out.print(arr[i]+",");
            }
        }
        System.out.println("]");
    }
}
